package cloudgamesaumysql

import (
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2025/4/25 14:51
*/

// CGGameAUPromotion 云游戏AU推广表
type CGGameAUPromotion struct {
	ID            int64          `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	PromotionCode string         `json:"promotion_code" gorm:"column:promotion_code;type:varchar(200);not null;default:'';comment:邀请码"`
	ActivityName  string         `json:"activity_name" gorm:"column:activity_name;type:varchar(200);not null;default:'';comment:活动标题"`
	InvitedNum    int64          `json:"invited_num" gorm:"column:invited_num;type:bigint;not null;default:0;comment:被邀请人数量"`
	Promoter      string         `json:"promoter" gorm:"column:promoter;type:varchar(512);not null;default:'';comment:推广员"`
	Operator      string         `json:"operator" gorm:"column:operator;type:varchar(64);not null;default:'';comment:操作人"`
	FinishTime    time.Time      `json:"finish_time" gorm:"column:finish_time;type:datetime;default:null;comment:截至时间"`
	IsExpired     int            `json:"is_expired" gorm:"column:is_expired;type:tinyint;not null;default:0;comment:是否过期；0没有过期 1已经过期"`
	CreatedAt     time.Time      `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt     time.Time      `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt     gorm.DeletedAt `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGGameAUPromotion) TableName() string {
	return "cg_game_au_promotion"
}
